package com.controller.seedoctor;

import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Timestamp;

@RestController
@RequestMapping("/seeDoctor")
@Api(value = "看病就诊模块",tags = "挂号列表接口")
public class RegisterController {
    //查询所有挂号患者基本信息

        @GetMapping("/register/queryRegister")
        @ApiOperation(value = "查询所有挂号患者基本信息", notes = "查询所有挂号患者基本信息")
        @ApiImplicitParams({
                @ApiImplicitParam(name = "CurrentPage", value = "当前页码数", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "PageSize", value = "每行显示记录数", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "bank_name", value = "患者姓名", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "state_type", value = "挂号状态", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "reg_time", value = "挂号时间", paramType = "query", dataType = "timestamp", required = true)
        })
        public String queryRegister(@ApiParam() Integer CurrentPage, Integer PageSize, String bank_name, String state_type, Timestamp reg_time) {

            return "{\n" +
                    "\t\"code\": 200,\n" +
                    "\t\"msg\": \"成功！\",\n" +
                    "\t\"data\": []\n" +
                    "}"+
                    "{\n" +
                    "\t\"code\": 500,\n" +
                    "\t\"msg\": \"服务器开小差！\",\n" +
                    "\t\"data\": []\n" +
                    "}";

        }

    //挂号列表退号按钮

        @PostMapping("/register/returnRegister")
        @ApiOperation(value = "删除患者挂号信息并退款", notes = "删除患者挂号信息并退款")
        @ApiImplicitParams({
                @ApiImplicitParam(name = "CurrentPage", value = "当前页码数", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "PageSize", value = "每行显示记录数", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "id", value = "挂号编号", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "department", value = "科室名称", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "reg_type_id", value = "挂号类型", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "reg_fees", value = "挂号费用", paramType = "query", dataType = "decimal", required = true)
        })
        public String returnRegister(@ApiParam() Integer CurrentPage, Integer PageSize,Integer id,String department, String reg_type_id,double reg_fees) {

            return "{\n" +
                    "\t\"code\": 200,\n" +
                    "\t\"msg\": \"成功！\",\n" +
                    "\t\"data\": []\n" +
                    "}"+
                    "{\n" +
                    "\t\"code\": 500,\n" +
                    "\t\"msg\": \"服务器开小差！\",\n" +
                    "\t\"data\": []\n" +
                    "}";

        }

    //挂号列表作废按钮

        @PostMapping("/register/deleteRegister")
        @ApiOperation(value = "删除患者挂号信息并退款", notes = "删除患者挂号信息并退款")
        @ApiImplicitParams({
                @ApiImplicitParam(name = "id", value = "挂号编号", paramType = "query", dataType = "Integer", required = true),
        })
        public String deleteRegister(@ApiParam() Integer id) {

            return "{\n" +
                    "\t\"code\": 200,\n" +
                    "\t\"msg\": \"成功！\",\n" +
                    "\t\"data\": []\n" +
                    "}"+
                    "{\n" +
                    "\t\"code\": 500,\n" +
                    "\t\"msg\": \"服务器开小差！\",\n" +
                    "\t\"data\": []\n" +
                    "}";

        }

    //付款按钮

        @PostMapping("/register/payRegister")
        @ApiOperation(value = "挂号费用付款", notes = "挂号费用付款")
        @ApiImplicitParams({
                @ApiImplicitParam(name = "id", value = "挂号编号", paramType = "query", dataType = "Integer", required = true),
                @ApiImplicitParam(name = "see_doctor_time", value = "日期", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "department", value = "科室名称", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "doctor", value = "医生姓名", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "reg_type_id", value = "挂号类型", paramType = "query", dataType = "String", required = true),
                @ApiImplicitParam(name = "reg_fees", value = "挂号费", paramType = "query", dataType = "decimal", required = true),
        })
        public String payRegister(@ApiParam() Integer id,String see_doctor_time,String department,String doctor,String reg_type_id,String reg_fees) {

            return "{\n" +
                    "\t\"code\": 200,\n" +
                    "\t\"msg\": \"成功！\",\n" +
                    "\t\"data\": []\n" +
                    "}"+
                    "{\n" +
                    "\t\"code\": 500,\n" +
                    "\t\"msg\": \"服务器开小差！\",\n" +
                    "\t\"data\": []\n" +
                    "}";

        }

    //查询患者状态下拉框

        @GetMapping("/register/querystatus")
        @ApiOperation(value = "查询患者付款状态", notes = "查询患者付款状态")
        @ApiImplicitParams({
                @ApiImplicitParam(name = "state_type", value = "状态", paramType = "query", dataType = "Integer", required = true),
        })
        public String querystatus(@ApiParam() Integer state_type) {

            return "{\n" +
                    "\t\"code\": 200,\n" +
                    "\t\"msg\": \"成功！\",\n" +
                    "\t\"data\": []\n" +
                    "}"+
                    "{\n" +
                    "\t\"code\": 500,\n" +
                    "\t\"msg\": \"服务器开小差！\",\n" +
                    "\t\"data\": []\n" +
                    "}";

        }
    }

